﻿define([

], function () {

    var Model = Backbone.Model.extend({
        list: function (callbackOk) {
            send("company/List", null, null, callbackOk);
        },
        listFull: function (callbackOk) {
            send("company/ListFull", null, null, callbackOk);
        },
        getCompany: function (id, callbackOk) {
            send("company/Get/" + id, null, null, callbackOk);
        },
        update: function (company, callbackOk) {
            send("company/Update", company, { type: "PUT" }, callbackOk);
        },
        create: function (company, callbackOk) {
            send("company/Create", company, { type: "POST" }, callbackOk);
        },
        deleteCompany: function (id, callbackOk) {
            send("company/Delete/" + id, null, { type: "DELETE" }, callbackOk);
        }
    });
    return Model;
});